package com.cnc.ssm.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

import java.io.Serializable;

/**
 * @author Hibernate CodeGenerator
 */
public class PwOperRole implements Serializable {

    /**
     * identifier field
     */
    private Long operRoleId;

    /**
     * persistent field
     */
    private String operCode;

    /**
     * persistent field
     */
    private String roleCode;

    /**
     * full constructor
     */
    public PwOperRole(java.lang.Long operRoleId, java.lang.String operCode, java.lang.String roleCode) {
        this.operRoleId = operRoleId;
        this.operCode = operCode;
        this.roleCode = roleCode;
    }

    /**
     * default constructor
     */
    public PwOperRole() {
    }

    public java.lang.Long getOperRoleId() {
        return this.operRoleId;
    }

    public void setOperRoleId(java.lang.Long operRoleId) {
        this.operRoleId = operRoleId;
    }

    public java.lang.String getOperCode() {
        return this.operCode;
    }

    public void setOperCode(java.lang.String operCode) {
        this.operCode = operCode;
    }

    public java.lang.String getRoleCode() {
        return this.roleCode;
    }

    public void setRoleCode(java.lang.String roleCode) {
        this.roleCode = roleCode;
    }

    public String toString() {
        return new ToStringBuilder(this)
                .append("operRoleId", getOperRoleId())
                .toString();
    }

    public boolean equals(Object other) {
        if (!(other instanceof PwOperRole)) return false;
        PwOperRole castOther = (PwOperRole) other;
        return new EqualsBuilder()
                .append(this.getOperRoleId(), castOther.getOperRoleId())
                .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
                .append(getOperRoleId())
                .toHashCode();
    }

}
